<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri = "http://java.sun.com/jstl/core_rt"  prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html>
  <head>
  	<base href="<%=basePath%>">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title></title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="robots" content="all,follow">
    <link rel="stylesheet" href="vendor/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="css/orionicons.css">
    <link rel="stylesheet" href="css/style.default.css" id="theme-stylesheet">
    <link rel="shortcut icon" href="img/favicon.png?3">
  </head>
  <script type="text/javascript">
    	function checkAll(flag){
    		//拿到所有的记录
    		var ids = document.getElementsByName("ids") ;
    		//循环设置每一个复选框
    		for(var i = 0 ;i <ids.length ;i++){
    			ids[i].checked = flag ;
    		}
    	}
    	
    	function delmore(){
    		//拿到所有的记录的复选框
    		var ids = document.getElementsByName("ids") ;
    		//循环判断每一个复选框是否选中，构建id字符串
    		var s = "" ;
    		for(var i = 0 ;i<ids.length ;i++){
    			if(ids[i].checked == true){
    				//拿到此复选框的value
    				s += ids[i].value + "," ;
    			}
    		}
    		//数据传递到服务端进行删除
    		window.location = "${pageContext.request.contextPath }/servlet/Controller?op=delmore&ids=" + s + "&currentPageIndex=${page.currentPageIndex}" ;
    	}
    	
    	function jump(index){
    		if("undefined" == typeof(index)){
    			//说明是点击的是超链接
    			//拿到文本框中的数据
    			var n = document.getElementById("pageindex").value ;
    			//判断是否合法
    			if(isNaN(n)){
    				alert("必须填写数字") ;
    				return ;
    			}
    			index = n ;
    		}
    		
    		window.location.href = "${pageContext.request.contextPath }/servlet/Controller?op=page&currentPageIndex=" + index ;
    	}
    </script>
  <body>
    
    <div class="d-flex align-items-stretch">
      <div id="sidebar" class="sidebar py-3">
        <div class="text-gray-400 text-uppercase px-3 px-lg-4 py-4 font-weight-bold small headings-font-family">后台管理系统</div>
        <ul class="sidebar-menu list-unstyled">
              <li class="sidebar-list-item"><a href="submit.jsp" class="sidebar-link text-muted  " ><i class="o-table-content-1 mr-3 text-gray"></i><span>待接订单（客户）</span></a></li>
              <li class="sidebar-list-item"><a href="orders.jsp" class="sidebar-link text-muted active"><i class="o-table-content-1 mr-3 text-gray"></i><span>已接订单（客户）</span></a></li>
        </ul>
      </div>
      <div class="page-holder w-100 d-flex flex-wrap">
        <div class="container-fluid px-xl-5">
          <section class="py-5">
            <div class="row">
              <div class="col-lg-12 mb-4">
                <div class="card">
                  <div class="card-header">
                    <h6 class="text-uppercase mb-0">已接订单&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href = "${pageContext.request.contextPath }/submit2.jsp">待接订单</a>&nbsp;&nbsp;&nbsp;
                  </div>
                  <div class="card-body">
                    <table class="table card-text">
                      <thead>
                        <tr>
        				 	 <th nowrap><input type = "checkbox" id = "all" onclick = "checkAll(this.checked)" >全选全不选</th>
        				 	 <th nowrap>订单号</th>
        				 	 <th nowrap>客户</th>
        				 	 <th nowrap>用户</th>
        				 	 <th nowrap>产品</th>
        				 	 <th nowrap>数量</th>
        				 	 <th nowrap>金额</th>
        				 	 <th nowrap>接单时间</th>
        				 	 <th nowrap>状态</th>
        				 	 <th nowrap>操作</th>
        				 </tr>
                      </thead>
                      <tbody>
    				 <tr>
       				 	 <td ><input type = "checkbox" name = "ids" value= "${c.id }" ></td>
       				 	 <td >178</td>
       				 	 <td >014</td>
       				 	 <td >182</td>
       				 	 <td >木材</td>
       				 	 <td >2</td>
       				 	 <td >200</td>	
       				 	 <td >2019.11.04</td>
       				 	 <td >已接单</td>
       				 	 <td ><a href="orders1.jsp">发货</a>&nbsp;&nbsp;<a href="orders.jsp">取消订单</a></td>
       				 </tr>
    				 			 <tr>
       				 	 <td ><input type = "checkbox" name = "ids" value= "${c.id }" ></td>
       				 	 <td >180</td>
       				 	 <td >014</td>
       				 	 <td >182</td>
       				 	 <td >钢材</td>
       				 	 <td >7</td>
       				 	 <td >700</td>	
       				 	 <td >2019.11.04</td>
       				 	 <td >已接单</td>
       				 	 <td ><a href="orders.jsp">发货</a>&nbsp;&nbsp;<a href="orders.jsp">取消订单</a></td>
       				 </tr>
    				 			 <tr>
       				 	 <td ><input type = "checkbox" name = "ids" value= "${c.id }" ></td>
       				 	 <td >173</td>
       				 	 <td >163</td>
       				 	 <td >183</td>
       				 	 <td >钢材</td>
       				 	 <td >80</td>
       				 	 <td >1000</td>
       				 	 <td >2019.11.04</td>
       				 	 <td >已接单</td>
       				 	 <td ><a href="orders.jsp">发货</a>&nbsp;&nbsp;<a href="orders.jsp">取消订单</a></td>
       				 </tr>
    				 			 <tr>
       				 	 <td ><input type = "checkbox" name = "ids" value= "${c.id }" ></td>
       				 	 <td >174</td>
       				 	 <td >164</td>
       				 	 <td >184</td>
       				 	 <td >钢材</td>
       				 	 <td >100</td>
       				 	 <td >10000</td>
       				 	 <td >2019.11.04</td>
       				 	 <td >已接单</td>
       				 	 <td ><a href="orders.jsp">发货</a>&nbsp;&nbsp;<a href="orders.jsp">取消订单</a></td>
       				 </tr>
    				 			 <tr>
       				 	 <td ><input type = "checkbox" name = "ids" value= "${c.id }" ></td>
       				 	 <td >175</td>
       				 	 <td >165</td>
       				 	 <td >185</td>
       				 	 <td >钢材</td>
       				 	 <td >100</td>
       				 	 <td >10000</td>
       				 	 <td >2019.11.04</td>
       				 	 <td >已接单</td>
       				 	 <td ><a href="orders.jsp">发货</a>&nbsp;&nbsp;<a href="orders.jsp">取消订单</a></td>
       				 </tr>
    				 			 <tr>
       				 	 <td ><input type = "checkbox" name = "ids" value= "${c.id }" ></td>
       				 	 <td >176</td>
       				 	 <td >166</td>
       				 	 <td >186</td>
       				 	 <td >钢材</td>
       				 	 <td >100</td>
       				 	 <td >10000</td>
       				 	 <td >2019.11.04</td>
       				 	 <td >已接单</td>
       				 	 <td ><a href="orders.jsp">发货</a>&nbsp;&nbsp;<a href="orders.jsp">取消订单</a></td>
       				 </tr>
    				 			 <tr>
       				 	 <td ><input type = "checkbox" name = "ids" value= "${c.id }" ></td>
       				 	 <td >166</td>
       				 	 <td >166</td>
       				 	 <td >186</td>
       				 	 <td >钢材</td>
       				 	 <td >100</td>
       				 	 <td >10000</td>
       				 	 <td >2019.11.04</td>
       				 	 <td >已接单</td>
       				 	 <td ><a href="orders.jsp">发货</a>&nbsp;&nbsp;<a href="orders.jsp">取消订单</a></td>
       				 </tr>
    				 			 <tr>
       				 	 <td ><input type = "checkbox" name = "ids" value= "${c.id }" ></td>
       				 	 <td >167</td>
       				 	 <td >167</td>
       				 	 <td >187</td>
       				 	 <td >钢材</td>
       				 	 <td >100</td>
       				 	 <td >10000</td>
       				 	 <td >2019.11.04</td>
       				 	 <td >已发货</td>
       				 	 <td ><a href="orders.jsp">取消订单</a></td>
       				 </tr>
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
            </div>
          </section>
        </div>
        <footer class="footer bg-white shadow align-self-end py-3 px-xl-5 w-100">
          <div class="container-fluid">
            <div class="row">
              <div class="col-md-6 text-center text-md-left text-primary">
                <p class="mb-2 mb-md-0">one &copy; 2018-2020</p>
              </div>
              <div class="col-md-6 text-center text-md-right text-gray-400">
                <p class="mb-0">Copyright &copy; one <a href="http://www.cssmoban.com/" target="_blank" title="one">one</a>
              </div>
            </div>
          </div>
        </footer>
      </div>
    </div>
    <script src="vendor/jquery/jquery.min.js"></script>
    <script src="vendor/popper.js/umd/popper.min.js"> </script>
    <script src="vendor/bootstrap/js/bootstrap.min.js"></script>
    <script src="vendor/jquery.cookie/jquery.cookie.js"> </script>
    <script src="vendor/chart.js/Chart.min.js"></script>
    <script src="js/js.cookie.min.js"></script>
    <script src="js/front.js"></script>
  </body>
</html>